'use strict';
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('news', {
      news_id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      cy_id: {
        type: Sequelize.INTEGER,
        comment: '文章分类id'
      },
      news_title: {
        type: Sequelize.STRING
      },
      news_cover: {
        type: Sequelize.STRING
      },
      introduce: {
        type: Sequelize.STRING
      },
      article: {
        type: Sequelize.TEXT
      },
      created_at: {
        type: Sequelize.INTEGER
      }
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('news');
  }
};